Skip to content

[release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace#16158

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.21from
rhamilto:OCPBUGS-78599
Mar 19, 2026
Merged

[release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace#16158
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.21from
rhamilto:OCPBUGS-78599

Conversation

@rhamilto
Copy link
Member

Summary

Fixes pagination issue when switching namespaces/projects via the project picker. Previously, the page query parameter persisted from the previous namespace, causing incorrect display (e.g., "51-3 of 3" with no data rows when navigating from page 2 of one project to another with fewer items).

This fix addresses the issue at two layers:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. Component layer (useConsoleDataViewData): Tracks namespace changes and resets pagination to page 1 when the namespace changes, similar to how it already resets when filters change.

Together, these changes ensure pagination properly resets to page 1 when switching namespaces while preserving the user's items-per-page preference.

Changes

Test plan

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

This commit adds namespace change detection to reset pagination,
ensuring users see page 1 when switching namespaces.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 17, 2026
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78390, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "4.22.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-78390 to depend on a bug targeting a version in 4.22.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Fixes pagination issue when switching namespaces/projects via the project picker. Previously, the page query parameter persisted from the previous namespace, causing incorrect display (e.g., "51-3 of 3" with no data rows when navigating from page 2 of one project to another with fewer items).

This fix addresses the issue at two layers:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. Component layer (useConsoleDataViewData): Tracks namespace changes and resets pagination to page 1 when the namespace changes, similar to how it already resets when filters change.

Together, these changes ensure pagination properly resets to page 1 when switching namespaces while preserving the user's items-per-page preference.

Changes

Test plan

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto rhamilto changed the title OCPBUGS-78390: Reset pagination page when changing namespace [release-4.21] OCPBUGS-78390: Reset pagination page when changing namespace Mar 17, 2026
@openshift-ci openshift-ci bot requested review from sg00dwin and spadgett March 17, 2026 12:31
@openshift-ci openshift-ci bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 17, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7202ddbe-a8c4-4921-a57e-a569848ee2a9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@rhamilto rhamilto changed the title [release-4.21] OCPBUGS-78390: Reset pagination page when changing namespace [release-4.21] OCPBUGS-78599: Reset pagination page when changing namespace Mar 17, 2026
@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-78390 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead
  • expected dependent Jira Issue OCPBUGS-78390 to target a version in 4.22.0, but it targets "4.21.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Fixes pagination issue when switching namespaces/projects via the project picker. Previously, the page query parameter persisted from the previous namespace, causing incorrect display (e.g., "51-3 of 3" with no data rows when navigating from page 2 of one project to another with fewer items).

This fix addresses the issue at two layers:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. Component layer (useConsoleDataViewData): Tracks namespace changes and resets pagination to page 1 when the namespace changes, similar to how it already resets when filters change.

Together, these changes ensure pagination properly resets to page 1 when switching namespaces while preserving the user's items-per-page preference.

Changes

Test plan

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-78390 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead
  • expected dependent Jira Issue OCPBUGS-78390 to target a version in 4.22.0, but it targets "4.21.z" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto
Copy link
Member Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@rhamilto: This pull request references Jira Issue OCPBUGS-78599, which is invalid:

  • expected dependent Jira Issue OCPBUGS-78390 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rhamilto
Copy link
Member Author

/approve
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Mar 17, 2026
@rhamilto
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

@rhamilto: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@TheRealJon TheRealJon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 18, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yanpzhan
Copy link
Contributor

Checked on cluster launched against the pr, on resource list page, eg, Pods page, projects dropdown was set to 'All Projects‘, chose ‘10 per page’ in pagination list, showed the second page by clicking '>'. Then switched to project 'openshift-console', the pods in openshift-console were shown up, and page was set in the first page, pagination was kept as '10 per page'.
/verified by yanpzhan

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 19, 2026
@openshift-ci-robot
Copy link
Contributor

@yanpzhan: This PR has been marked as verified by yanpzhan.

Details

In response to this:

Checked on cluster launched against the pr, on resource list page, eg, Pods page, projects dropdown was set to 'All Projects‘, chose ‘10 per page’ in pagination list, showed the second page by clicking '>'. Then switched to project 'openshift-console', the pods in openshift-console were shown up, and page was set in the first page, pagination was kept as '10 per page'.
/verified by yanpzhan

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@logonoff
Copy link
Member

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 19, 2026
@openshift-ci-robot
Copy link
Contributor

@logonoff: This pull request references Jira Issue OCPBUGS-78599, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.z) matches configured target version for branch (4.21.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-78390 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-78390 targets the "4.22.0" version, which is one of the valid target versions: 4.22.0
  • bug has dependents

Requesting review from QA contact:
/cc @yapei

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from yapei March 19, 2026 15:58
@openshift-merge-bot openshift-merge-bot bot merged commit 8c8f279 into openshift:release-4.21 Mar 19, 2026
8 checks passed
@openshift-ci-robot
Copy link
Contributor

@rhamilto: Jira Issue OCPBUGS-78599: Some pull requests linked via external trackers have merged:

The following pull request, linked via external tracker, has not merged:

All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-78599 has not been moved to the MODIFIED state.

This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload.

Details

In response to this:

Summary

Fixes pagination issue when switching namespaces/projects via the project picker. Previously, the page query parameter persisted from the previous namespace, causing incorrect display (e.g., "51-3 of 3" with no data rows when navigating from page 2 of one project to another with fewer items).

This fix addresses the issue at two layers:

  1. Navigation layer (formatNamespaceRoute): Removes the 'page' query parameter when building the new URL during namespace changes, while preserving 'perPage' as a user preference.

  2. Component layer (useConsoleDataViewData): Tracks namespace changes and resets pagination to page 1 when the namespace changes, similar to how it already resets when filters change.

Together, these changes ensure pagination properly resets to page 1 when switching namespaces while preserving the user's items-per-page preference.

Changes

Test plan

  • Switch between namespaces using the project picker
  • Verify pagination resets to page 1 when changing namespaces
  • Verify items-per-page preference is preserved
  • Run automated tests: yarn test

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. component/core Related to console core functionality jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants